Skip to content

Instantly share code, notes, and snippets.

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@rohitg00
rohitg00 / llm-wiki.md
Last active May 8, 2026 14:00 — forked from karpathy/llm-wiki.md
LLM Wiki v2 — extending Karpathy's LLM Wiki pattern with lessons from building agentmemory

LLM Wiki v2

A pattern for building personal knowledge bases using LLMs. Extended with lessons from building agentmemory, a persistent memory engine for AI coding agents.

This builds on Andrej Karpathy's original LLM Wiki idea file. Everything in the original still applies. This document adds what we learned running the pattern in production: what breaks at scale, what's missing, and what separates a wiki that stays useful from one that rots.

What the original gets right

The core insight is correct: stop re-deriving, start compiling. RAG retrieves and forgets. A wiki accumulates and compounds. The three-layer architecture (raw sources, wiki, schema) works. The operations (ingest, query, lint) cover the basics. If you haven't read the original, start there.

@magnetikonline
magnetikonline / README.md
Last active May 8, 2026 14:00
Bash string manipulation cheatsheet.

Bash string manipulation cheatsheet

Assignment
Assign value to variable if variable is not already set, value is returned.

Combine with a : no-op to discard/ignore return value.
${variable="value"}
: ${variable="value"}
{
"cats": [
"~ CAMP. TR/NEW",
"~ CAMP. TR/OLD",
"~ CAMP. PS",
"~ CAMP. TS/RC",
"~ CAMP. TDS~SUT",
"~ CAMP. A&D",
"~ CAMP. Winback",
"~ CAMP. Legacy",
@fonic
fonic / python_argparse_custom_help_usage.py
Last active May 8, 2026 13:53
Python module extending class 'argparse.ArgumentParser' to support custom help/usage output (incl. example/demo)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2019-2026 Fonic <https://github.com/fonic>
# -------------------------------------------------------------------------
# -
# Python Module Argument Parser -
# -
@PM2Ring
PM2Ring / fano_plane.svg
Created October 2, 2017 12:19
The usual projection of the Fano plane. Hover over a node to see the nodes on the line dual to that node.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dantz
dantz / dashboard.yaml
Created May 2, 2026 07:51
Das Küchendashboard, wie es in meinem Video unter https://youtu.be/YBZ8nEqh4RU zu sehen ist.
kiosk_mode:
hide_header: true
hide_sidebar: true
views:
- type: sections
sections:
- type: grid
cards:
- type: conditional
conditions: